<template>
	<view class="m-t-28 bg-white br20 p-40" style="width: 100%; " @click="getOrderFun(item.id)" >
		<view class="flex row-between">
			<view class="flex ">
				<view class="type-div br10 flex-content">
					{{item.type==1?"专车":"顺风车"}}
				</view>
				<view class="bold xxl m-l-34">
					{{item.car_name}}
				</view> 
			</view>
			<view class="flex lg">
				<view class="status-color">
					{{item.status_desc}}
				</view>
			<!-- 	<view class="flex">
					<u-icon name="arrow-right" color="#848484"></u-icon>
				</view> -->
			</view>
		</view>
		<view class=" flex m-t-28 lg">
			<view class="">
				<u-icon name="clock" color="#a1a1a1"></u-icon>
			</view>
			<view style="color: #a1a1a1;" class="m-l-18" >
				{{item.create_time}}
			</view>
		</view>
		<view class="flex row-between m-t-20 col-bottom"  >
			<view class="">
				<view class="flex place-width" >
					<view class="green-border">
						
					</view>
					<view class="xl m-l-24 char-width line-1">
						{{item.address[0].start_address}}
					</view>
				</view>
				<view class="flex  m-t-14 " v-if="item.address_count>0"  style="position: relative;">
					<view class="m-r-10" style="position: absolute;left: 10rpx;top: -25%;" >
						<s-dot :active="true" backgroundColor="#e85732"></s-dot>
					</view>
					<view style="color: #b6b5b4;" class="xs m-l-30">{{item.address_count}}个中转站</view>
				</view>
				<view class="flex place-width m-t-14">
					<view class="red-border">
						
					</view>
					<view class="xl m-l-24 char-width line-1" >
						{{item.address[0].end_address}}
					</view>
				</view>
			</view>
		
		</view>
		<view class="xxl bold " style="width: 100%; display: flex;align-items: center; justify-content: flex-end;">
			{{item.order_amount}}元
		</view>
	</view>
</template>

<script>
	export default {
		name:"ordertype-list",
		props:{
			item:{
				type:Object,
				default:()=>{}
			},
			select:{
				type:Boolean,
				default:()=>false
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			getOrderFun(id){
				console.log(213);
				// this.$emit('getOrderFun',id)
				if(this.select==true){
					this.$emit('selectSend',id)
					// uni.redirectTo({
					// 	url:'/pages/confirm_order/confirm_order?id=' + id
					// })
				}
				// 拿订单详情=> 
				if(this.select==false){
					
					uni.navigateTo({
						url:'/bundle/pages/order_details/order_details?id=' + id
					})
				}
				
			}
		}
	}
</script>

<style lang="scss">
.type-div{
	background-color: #F0F0F0;
	color:  #717070;
	width: 88rpx;
	height: 44rpx;
	
}
.status-color{
	color:#848484;
}
.green-border{
	width: 24rpx;
	border-radius: 30rpx;
	height: 24rpx;
	border: 4rpx solid #149664;
}
.red-border{
     width: 24rpx;
	border-radius: 30rpx;
	height: 24rpx;
	border: 4rpx solid #E85631;
}
.char-width{
	width: 450rpx;
	
}
.place-width{
	width: 480rpx; 
}
.xxxl{
	font-size: 40rpx;
}
</style>
